package com.gdufe.studytogether.controller;

import com.gdufe.studytogether.domain.R;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class ExceptionController {
    @ExceptionHandler(value = Exception.class)
    public R handleException(Throwable e) {
        e.printStackTrace();
        return R.error(e.getMessage());
    }
}
